package com.example.demo.dao;

import com.example.demo.entify.Order;
import com.example.demo.entify.Record;

import java.util.List;

import javax.websocket.server.PathParam;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface OrderDao {
	// 新建工单
	int addOrder(Order order);
	// 查询所有工单
	List<Order> Allolders();
	// 工人查询工单
	List<Order> WorkerOlders(@Param("username") String username);
	List<Order> WorkerOlders2(String worker);
	// 工人接单
	int updateState(Order order);
	// 工人拒绝工单
	int rejectOrder(Order order);
	// 重新派发工单
	int Redistribute(Order order);
	Order findOrderByid(Integer orderid);	
	int AddRecord(Record record);
	List<Record> list(Integer orderId);
	
}
